<?php
class mdl_object_remoteuserinfo extends mdl_object {

	public function __construct($suid, $name, $nick, $icon, $sex, $params = array()) {

		// uid":"1","name":"kevin","nick":"","icon":"","sex":"0","status":"0","fld1":null,"fld2":null,"fld3":null,"fld4":null,"fld5":null

		$this->container = array(
			'puid' => $suid,
			'name' => $name,
			'nick' => $nick,
			'icon' => $icon,
			'sex' => $sex,

			'status' => '0',
			'fld1' => isset($params['fld1']) ? $params['fld1'] : '',
			'fld2' => isset($params['fld2']) ? $params['fld2'] : '',
			'fld3' => isset($params['fld3']) ? $params['fld3'] : '',
			'fld4' => isset($params['fld4']) ? $params['fld4'] : '',
			'fld5' => isset($params['fld5']) ? $params['fld5'] : '',
		);
	}

	public function getPUid() {
		return $this->container['puid'];
	}

	public function getName() {
		return $this->container['name'];
	}

	public function getNick() {
		return $this->container['nick'];
	}

	public function getIcon() {
		return $this->container['icon'];
	}

	public function getSex() {
		return $this->container['sex'];
	}

	public function getFlds() {
		return array(
			'fld1' => $this->container['fld1'],
			'fld2' => $this->container['fld2'],
			'fld3' => $this->container['fld3'],
			'fld4' => $this->container['fld4'],
			'fld5' => $this->container['fld5'],
		);
	}
}